package library.net.retrofit.exception;

/**
 * @author Created by qiang.hou on 2017/12/15.
 * @version 1.0
 */
public class RxException extends RuntimeException {
    private int code;
    private String message;

    public RxException(int code) {
        this.code = code;
    }

    public RxException(int code, String message) {
        this.code = code;
        this.message = message;
    }

    public RxException(Throwable throwable, int code) {
        super(throwable);
        this.code = code;
    }

    public RxException(Throwable throwable, int code, String message) {
        super(throwable);
        this.code = code;
        this.message = message;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public int getCode() {
        return code;
    }

    @Override
    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }
}
